from paddleocr import PaddleOCR, draw_ocr
from PIL import Image


def imageText(imgUrl: str):
    ocr = PaddleOCR(use_angle_cls=True, lang="ch")
    result = ocr.ocr(imgUrl, cls=True)
    resultList = []

    for idx in range(len(result)):
        res = result[idx]
        for line in res:
            resultList.append(line[1][0])
    return resultList
